gtk4.git
14 years agobloatpad: move action/menu setup to ::startup
Ryan Lortie [Fri, 2 Dec 2011 15:36:49 +0000 (10:36 -0500)]
bloatpad: move action/menu setup to ::startup

No need to waste time doing this in init() if we are not going to become
the primary instance.

14 years agobloatpad: port to GActionMap for application
Ryan Lortie [Fri, 2 Dec 2011 15:32:10 +0000 (10:32 -0500)]
bloatpad: port to GActionMap for application

g_application_set_action_group() is now deprecated.

14 years agoGtkModelMenuItem: don't leak a GVariant
Ryan Lortie [Fri, 2 Dec 2011 03:59:27 +0000 (22:59 -0500)]
GtkModelMenuItem: don't leak a GVariant

14 years agobloatpad: use GtkBuilder for constructing menus
Ryan Lortie [Fri, 2 Dec 2011 03:43:54 +0000 (22:43 -0500)]
bloatpad: use GtkBuilder for constructing menus

This is closer to what a real application would want to do.

14 years agoGtkModelMenuItem: omit indicator if not required
Ryan Lortie [Fri, 2 Dec 2011 03:33:30 +0000 (22:33 -0500)]
GtkModelMenuItem: omit indicator if not required

GtkModelMenuItem, being based on GtkCheckMenuItem, was always reserving
space for a check/radio indicator.  This ends up looking pretty strange
in a GtkMenuBar.

Don't reserve space for the indicator unless it's appropriate.

14 years agoGtkApplicationWindow: nuke some g_print spew
Ryan Lortie [Fri, 2 Dec 2011 03:16:34 +0000 (22:16 -0500)]
GtkApplicationWindow: nuke some g_print spew

14 years agoGtkApplcationWindow: plug two obvious leaks
Ryan Lortie [Fri, 2 Dec 2011 03:14:57 +0000 (22:14 -0500)]
GtkApplcationWindow: plug two obvious leaks

14 years agoGtkApplicationWindow: Consistently unparent menubar
Colin Walters [Fri, 2 Dec 2011 03:13:56 +0000 (22:13 -0500)]
GtkApplicationWindow: Consistently unparent menubar

We create it floating, and don't hold an extra ref, so we should
just unparent it.

14 years agoGtkApplicationWindow: clean up menubar logic
Ryan Lortie [Fri, 2 Dec 2011 03:01:07 +0000 (22:01 -0500)]
GtkApplicationWindow: clean up menubar logic

14 years agoOnly add a separator when a section ends
Matthias Clasen [Fri, 2 Dec 2011 01:49:05 +0000 (20:49 -0500)]
Only add a separator when a section ends

14 years agointroduce GtkModelMenuItem
Ryan Lortie [Fri, 2 Dec 2011 01:39:11 +0000 (20:39 -0500)]
introduce GtkModelMenuItem

This GtkMenuItem subclass (and GActionObserver implementation) contains
all the knowledge necessary for converting a GMenuModel item description
into a GtkMenuItem.

Remove much of the code that used to do this from
gtkapplicationwindow.c.

14 years agoGtkSettings: add shell-shows-menubar property
Ryan Lortie [Fri, 2 Dec 2011 00:57:32 +0000 (19:57 -0500)]
GtkSettings: add shell-shows-menubar property

Unity will set this to tell us that it is going to handle displaying the
menubar.

14 years agoOnly add separators when a section actually ends
Matthias Clasen [Thu, 1 Dec 2011 23:13:15 +0000 (18:13 -0500)]
Only add separators when a section actually ends

14 years agoBloatpad: Add a View menu for fullscreen
Matthias Clasen [Thu, 1 Dec 2011 22:46:28 +0000 (17:46 -0500)]
Bloatpad: Add a View menu for fullscreen

14 years agoBloatpad: Don't leak a menu model
Matthias Clasen [Thu, 1 Dec 2011 22:41:46 +0000 (17:41 -0500)]
Bloatpad: Don't leak a menu model

14 years agobloatpad: Be 640x480 by default
Colin Walters [Thu, 1 Dec 2011 22:53:28 +0000 (17:53 -0500)]
bloatpad: Be 640x480 by default

Because otherwise we're just a few pixels, and this is the least lame
solution I know of in GTK+.

14 years agoGtkApplicationWindow: Further sanitize handling of merging app menu and menubar
Colin Walters [Thu, 1 Dec 2011 22:47:34 +0000 (17:47 -0500)]
GtkApplicationWindow: Further sanitize handling of merging app menu and menubar

The _set_show_app_menu should really be _set_show_menubar().

Also, correctly display just the window menu in the window when run
under GNOME 3.

14 years agobloatpad: Fix Edit to be a submenu
Colin Walters [Thu, 1 Dec 2011 22:12:20 +0000 (17:12 -0500)]
bloatpad: Fix Edit to be a submenu

14 years agoGtkApplication: Merge app menu and menubar
Colin Walters [Thu, 1 Dec 2011 21:46:36 +0000 (16:46 -0500)]
GtkApplication: Merge app menu and menubar

Change bloatpad to have both an app menu and a menubar.

14 years agoGtkApplicationWindow: Make mnemonics work for stateful actions
Matthias Clasen [Thu, 1 Dec 2011 20:25:46 +0000 (15:25 -0500)]
GtkApplicationWindow: Make mnemonics work for stateful actions

14 years agoBloatpad: Add mnemonics to the menu
Matthias Clasen [Thu, 1 Dec 2011 20:25:24 +0000 (15:25 -0500)]
Bloatpad: Add mnemonics to the menu

14 years agoGtkApplicationWindow: Don't unref a NULL object
Colin Walters [Thu, 1 Dec 2011 18:29:41 +0000 (13:29 -0500)]
GtkApplicationWindow: Don't unref a NULL object

14 years agoAdapt to changes in GLib API
Ryan Lortie [Thu, 1 Dec 2011 17:18:22 +0000 (12:18 -0500)]
Adapt to changes in GLib API

g_application_get_menu() -> get_app_menu().

14 years agoDrop GtkApplicationMenuButton for now
Matthias Clasen [Thu, 1 Dec 2011 17:17:53 +0000 (12:17 -0500)]
Drop GtkApplicationMenuButton for now

This feels premature; we do have the fallback situation covered
adaequately with the menubar, and people can do their own creative
solutions with gtk_application_window_get_menu(), so we don't have
to offer a widget for this right now.

14 years agoRemove a redundant test
Matthias Clasen [Thu, 1 Dec 2011 13:51:22 +0000 (08:51 -0500)]
Remove a redundant test

14 years agoGtkApplicationMenuButton: add docs
Matthias Clasen [Thu, 1 Dec 2011 13:33:08 +0000 (08:33 -0500)]
GtkApplicationMenuButton: add docs

14 years agoUndoccommentify action muxer files
Matthias Clasen [Thu, 1 Dec 2011 11:30:10 +0000 (06:30 -0500)]
Undoccommentify action muxer files

14 years agoWhitespace fixes
Matthias Clasen [Thu, 1 Dec 2011 05:21:11 +0000 (00:21 -0500)]
Whitespace fixes

14 years agoHook up docs
Matthias Clasen [Thu, 1 Dec 2011 05:09:45 +0000 (00:09 -0500)]
Hook up docs

14 years agoRemove no-longer existing function
Matthias Clasen [Thu, 1 Dec 2011 05:02:08 +0000 (00:02 -0500)]
Remove no-longer existing function

14 years agoGtkApplicationWindow: more docs
Matthias Clasen [Thu, 1 Dec 2011 04:59:32 +0000 (23:59 -0500)]
GtkApplicationWindow: more docs

14 years agoInclude gtkapplicationmenubutton.h in gtk.h
Matthias Clasen [Thu, 1 Dec 2011 04:55:05 +0000 (23:55 -0500)]
Include gtkapplicationmenubutton.h in gtk.h

14 years agoGtkApplicationWindow: mark a string for translation
Matthias Clasen [Thu, 1 Dec 2011 04:53:39 +0000 (23:53 -0500)]
GtkApplicationWindow: mark a string for translation

14 years agoSome coding style fixes
Matthias Clasen [Thu, 1 Dec 2011 04:49:23 +0000 (23:49 -0500)]
Some coding style fixes

14 years agoGtkApplication: doc improvement
Matthias Clasen [Thu, 1 Dec 2011 04:48:59 +0000 (23:48 -0500)]
GtkApplication: doc improvement

14 years agoSome initial docs
Matthias Clasen [Thu, 1 Dec 2011 00:14:48 +0000 (19:14 -0500)]
Some initial docs

14 years agoDrop an unused variable
Matthias Clasen [Wed, 30 Nov 2011 21:50:17 +0000 (16:50 -0500)]
Drop an unused variable

14 years agoDon't call g_object_unref on a variant
Matthias Clasen [Wed, 30 Nov 2011 21:33:32 +0000 (16:33 -0500)]
Don't call g_object_unref on a variant

Tsk, tsk...

14 years agoGtkApplicationWindow: Use dispose for GObjects
Colin Walters [Wed, 30 Nov 2011 20:55:31 +0000 (15:55 -0500)]
GtkApplicationWindow: Use dispose for GObjects

This ensures we break cyclic references.

14 years agogtkapplicationwindow: Pick up gtk-shell-shows-app-menu XSetting
Colin Walters [Wed, 30 Nov 2011 20:41:43 +0000 (15:41 -0500)]
gtkapplicationwindow: Pick up gtk-shell-shows-app-menu XSetting

Calling gtk_application_window_set_show_app_menu() is now an override
for that setting.  If you don't call it, we pick up the default.

14 years agogdk: Fix prototype for gdk_x11_window_set_utf8_property
Colin Walters [Wed, 30 Nov 2011 20:41:02 +0000 (15:41 -0500)]
gdk: Fix prototype for gdk_x11_window_set_utf8_property

14 years agobloatpad: use GtkApplicationMenuButton
Ryan Lortie [Wed, 30 Nov 2011 20:25:12 +0000 (15:25 -0500)]
bloatpad: use GtkApplicationMenuButton

14 years agoadd GtkApplicationMenuButton
Ryan Lortie [Wed, 30 Nov 2011 20:24:22 +0000 (15:24 -0500)]
add GtkApplicationMenuButton

14 years agobloatpad: add 'win.fullscreen' action
Ryan Lortie [Wed, 30 Nov 2011 18:39:38 +0000 (13:39 -0500)]
bloatpad: add 'win.fullscreen' action

14 years agobloatpad: make "about" a window action
Ryan Lortie [Wed, 30 Nov 2011 17:07:25 +0000 (12:07 -0500)]
bloatpad: make "about" a window action

By making "about" a per-window action, we can pop the about dialog up on
top of the correct window instead of trying to guess from the
application list of windows.

14 years agoGtkApplicationWindow: wire up action activations
Ryan Lortie [Wed, 30 Nov 2011 17:06:40 +0000 (12:06 -0500)]
GtkApplicationWindow: wire up action activations

Wire the 'activate_action' and 'change_action_state' vfuncs through to
the GSimpleActionGroup.

14 years agogtk.symbols fixes
Ryan Lortie [Wed, 30 Nov 2011 16:58:38 +0000 (11:58 -0500)]
gtk.symbols fixes

14 years agoGtkApplicationWindow: implement GActionMap
Ryan Lortie [Wed, 30 Nov 2011 16:51:41 +0000 (11:51 -0500)]
GtkApplicationWindow: implement GActionMap

14 years agoport bloatpad to the new APIs
Ryan Lortie [Wed, 30 Nov 2011 14:41:00 +0000 (09:41 -0500)]
port bloatpad to the new APIs

14 years agoadd GtkApplicationWindow
Ryan Lortie [Wed, 30 Nov 2011 14:34:29 +0000 (09:34 -0500)]
add GtkApplicationWindow

This is a GtkWindow subclass that "application windows" will use.  Each
is associated with a GtkApplication, has the ability to show menus and
will have its own associated set of actions.

14 years agoadd GActionMuxer and observer interfaces
Ryan Lortie [Wed, 30 Nov 2011 14:33:03 +0000 (09:33 -0500)]
add GActionMuxer and observer interfaces

These were destined for GLib, but they don't really make sense as a
public API.  Instead, we'll copy/paste them around between the various
codebases that need to render menus.

14 years agoGtkSettings: add shell-shows-app-menu property
Ryan Lortie [Wed, 30 Nov 2011 03:28:11 +0000 (22:28 -0500)]
GtkSettings: add shell-shows-app-menu property

This is a boolean property that will be set to TRUE if the current
desktop environment is capable of displaying the application menu as
part of the desktop shell.

If it is FALSE then the application will need to display the menu for
itself.

14 years agoMake it build against the current wip/menus-rebase3 branch
Matthias Clasen [Tue, 29 Nov 2011 22:44:11 +0000 (17:44 -0500)]
Make it build against the current wip/menus-rebase3 branch

14 years agotestgmenu: #ifdef out non-compiling code for now
Colin Walters [Tue, 29 Nov 2011 20:59:20 +0000 (15:59 -0500)]
testgmenu: #ifdef out non-compiling code for now

14 years agoAdd a very bad fallback check
Matthias Clasen [Tue, 29 Nov 2011 04:40:18 +0000 (23:40 -0500)]
Add a very bad fallback check

...maybe committing this inspires some better solution.

14 years agowindow: Set a _DBUS_APPLICATION_ID X11 window property
Colin Walters [Fri, 25 Nov 2011 22:22:16 +0000 (17:22 -0500)]
window: Set a _DBUS_APPLICATION_ID X11 window property

This will allow gnome-shell to reference it.

14 years agox11: Add gdk_x11_window_set_utf8_property
Colin Walters [Fri, 25 Nov 2011 22:21:05 +0000 (17:21 -0500)]
x11: Add gdk_x11_window_set_utf8_property

A convenience function to manipulate UTF-8 X11 properties; no point
in wrapping each one in individual setters.

14 years agoGtkApplication: Insert separators after sections
Matthias Clasen [Sun, 27 Nov 2011 04:44:37 +0000 (23:44 -0500)]
GtkApplication: Insert separators after sections

The previous code was only inserting a separator when a new
section was starting right away, which may not always be the
case.

14 years agotestgmenu: Insert separators after sections
Matthias Clasen [Sun, 27 Nov 2011 04:42:33 +0000 (23:42 -0500)]
testgmenu: Insert separators after sections

The previous code was only inserting a separator when a new
section was starting right away.

14 years agoGtkApplication: Initial attempt at section headings
Matthias Clasen [Sat, 26 Nov 2011 18:32:48 +0000 (13:32 -0500)]
GtkApplication: Initial attempt at section headings

This should be redone to show the label together with the
separator line, somehow. For now, just put the label below
the separator, as a separate item.

14 years agotestgmenu: Initial attempt at section headings
Matthias Clasen [Sat, 26 Nov 2011 18:27:18 +0000 (13:27 -0500)]
testgmenu: Initial attempt at section headings

This should be redone to show the label together with the
separator line, somehow. For now, just put the label below
the separator, as a separate item.

14 years agoGtkApplication: use activate for actions here, too
Matthias Clasen [Sat, 26 Nov 2011 18:06:04 +0000 (13:06 -0500)]
GtkApplication: use activate for actions here, too

14 years agotestgmenu: Use activate with parameter for radio actions
Matthias Clasen [Sat, 26 Nov 2011 17:39:05 +0000 (12:39 -0500)]
testgmenu: Use activate with parameter for radio actions

This is how stateful actions are supposed to be activated, using
change_state for this was not right at all.

14 years agotestgmenu: Use activate for toggle actions
Matthias Clasen [Sat, 26 Nov 2011 16:56:42 +0000 (11:56 -0500)]
testgmenu: Use activate for toggle actions

This is how stateful actions are supposed to be activated, using
change_state for this was not right at all.

14 years agotestgmenu: Quit on delete-event
Colin Walters [Mon, 21 Nov 2011 14:58:37 +0000 (09:58 -0500)]
testgmenu: Quit on delete-event

14 years agoAdapt to api changes in GMenuModel
Matthias Clasen [Sat, 19 Nov 2011 05:02:09 +0000 (00:02 -0500)]
Adapt to api changes in GMenuModel

14 years agoAdapt to object path conventions
Matthias Clasen [Fri, 18 Nov 2011 02:58:20 +0000 (21:58 -0500)]
Adapt to object path conventions

Seems common to expect 'path == bus name with slashes'.

14 years agobloatpad: Add an example app menu
Matthias Clasen [Wed, 9 Nov 2011 04:36:32 +0000 (23:36 -0500)]
bloatpad: Add an example app menu

The bloatpad example shows simple GtkApplication usage,
so it makes sense to test app menu api here as well.

14 years agoGtkApplication: add a way to get the appmenu
Matthias Clasen [Wed, 9 Nov 2011 04:35:06 +0000 (23:35 -0500)]
GtkApplication: add a way to get the appmenu

This function either returns a GtkMenu or NULL.
Still to do: detect if the app menu is externally handled.

14 years agoDrop an unused variable
Matthias Clasen [Wed, 9 Nov 2011 00:04:33 +0000 (19:04 -0500)]
Drop an unused variable

14 years agoRemove an unneeded include
Matthias Clasen [Wed, 9 Nov 2011 00:03:40 +0000 (19:03 -0500)]
Remove an unneeded include

14 years agotestgmenu: Demonstrate how translatable labels work
Matthias Clasen [Tue, 8 Nov 2011 21:28:22 +0000 (16:28 -0500)]
testgmenu: Demonstrate how translatable labels work

14 years agoPass domain to the menu parser
Matthias Clasen [Tue, 8 Nov 2011 21:24:32 +0000 (16:24 -0500)]
Pass domain to the menu parser

This is necessary to make translations in markup work.

14 years agoMore dynamic changes
Matthias Clasen [Sun, 6 Nov 2011 06:17:15 +0000 (01:17 -0500)]
More dynamic changes

14 years agoCleanups
Matthias Clasen [Sun, 6 Nov 2011 05:14:33 +0000 (01:14 -0400)]
Cleanups

Separate the menu generation code and all callbacks in a
MenuHolder struct.

14 years agoQuick-and-dirty GtkBuilder integration
Matthias Clasen [Tue, 1 Nov 2011 23:53:51 +0000 (19:53 -0400)]
Quick-and-dirty GtkBuilder integration

This makes GtkBuilder accept a GMenuMarkup tree at the toplevel
(ie with <menu id='foo'> being a child of <interface>) and the resulting
GMenu object can be obtained via gtk_builder_get_object (builder, "foo").

14 years agoBrute-force dynamic change propagation
Matthias Clasen [Tue, 1 Nov 2011 12:49:04 +0000 (08:49 -0400)]
Brute-force dynamic change propagation

We need to make sure that we connect to ::items-changed on every
single model, as they appear and disappear. Ugly business.

14 years agoFirst attempt at handling dynamic changes
Matthias Clasen [Tue, 1 Nov 2011 05:27:49 +0000 (01:27 -0400)]
First attempt at handling dynamic changes

We need to connect to items-changed on _every_ menu
model, which is somewhat icky. For some reason, this
works fine with a local model, but not with D-Bus in
between. Debugging needed.

14 years agoAdd code for dynamic changes
Matthias Clasen [Tue, 1 Nov 2011 04:30:31 +0000 (00:30 -0400)]
Add code for dynamic changes

Add and remove items and actions - we don't update
the menus properly yet.

14 years agoAdd some todos
Matthias Clasen [Mon, 31 Oct 2011 12:28:05 +0000 (08:28 -0400)]
Add some todos

14 years agoSome GMenu test code
Matthias Clasen [Sun, 30 Oct 2011 16:35:12 +0000 (12:35 -0400)]
Some GMenu test code

This is some test code for constructing GtkMenus from GMenus.

14 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 19 Dec 2011 16:14:35 +0000 (17:14 +0100)]
Updated Spanish translation

14 years agoa11y: emit entry signals immediately
Benjamin Otte [Mon, 19 Dec 2011 15:15:52 +0000 (16:15 +0100)]
a11y: emit entry signals immediately

We want to emit signals when stuff happens, not sometime later. That way
we can also catch the correct text that was deleted.

https://bugzilla.gnome.org/show_bug.cgi?id=659445

14 years agox11: Avoid spurious focus events on grabs
Benjamin Otte [Mon, 19 Dec 2011 11:39:53 +0000 (12:39 +0100)]
x11: Avoid spurious focus events on grabs

We want to avoid handling focus events for the private focus window,
otherwise the keyboard grab taken by for example buttons will cause a
spurious FOCUS_OUT/FOCUS_IN on the toplevel.

The code that did this seems to have been lost in the XI2 transition for
GTK3.

https://bugzilla.gnome.org/show_bug.cgi?id=657578

14 years agox11: Unify focus handling code
Benjamin Otte [Mon, 19 Dec 2011 10:19:35 +0000 (11:19 +0100)]
x11: Unify focus handling code

This code was essentially copy-pasted in two locations, so unify them in
the same place.

https://bugzilla.gnome.org/show_bug.cgi?id=657578

14 years agoa11y: implement widget_(un)set in ContainerCell
Benjamin Otte [Sun, 18 Dec 2011 20:07:27 +0000 (21:07 +0100)]
a11y: implement widget_(un)set in ContainerCell

14 years agoa11y: Make GtkCellAccessible a GtkAccessible
Benjamin Otte [Mon, 19 Dec 2011 05:10:16 +0000 (06:10 +0100)]
a11y: Make GtkCellAccessible a GtkAccessible

14 years agotests: Avoid deprecation warning
Benjamin Otte [Sun, 18 Dec 2011 19:25:23 +0000 (20:25 +0100)]
tests: Avoid deprecation warning

14 years agoaccessible: Deprecate gtk_accessible_connect_widget_destroyed()
Benjamin Otte [Sun, 18 Dec 2011 19:24:46 +0000 (20:24 +0100)]
accessible: Deprecate gtk_accessible_connect_widget_destroyed()

That was an abomination. Also, if people called it twice, you got even
mor signal handlers!

14 years agowidget: Set widget in accessible's constructor
Benjamin Otte [Sun, 18 Dec 2011 19:21:50 +0000 (20:21 +0100)]
widget: Set widget in accessible's constructor

No need to add t manually later.

14 years agoa11y: Don't connect_destroyed anymore
Benjamin Otte [Sun, 18 Dec 2011 19:19:32 +0000 (20:19 +0100)]
a11y: Don't connect_destroyed anymore

It's not used now that set_widget() does the right thing.

14 years agoiconview: Simplify adjustment monitoring for accessible
Benjamin Otte [Sun, 18 Dec 2011 19:18:04 +0000 (20:18 +0100)]
iconview: Simplify adjustment monitoring for accessible

14 years agoa11y: Remove widget_destroyed call
Benjamin Otte [Sun, 18 Dec 2011 18:21:07 +0000 (19:21 +0100)]
a11y: Remove widget_destroyed call

GtkAccessible does all of that for us now.

14 years agoa11y: Use widget_unset vfunc in treeview
Benjamin Otte [Sun, 18 Dec 2011 18:20:15 +0000 (19:20 +0100)]
a11y: Use widget_unset vfunc in treeview

14 years agoaccessible: Ensure we unset the widget when finalizing
Benjamin Otte [Sun, 18 Dec 2011 16:29:31 +0000 (17:29 +0100)]
accessible: Ensure we unset the widget when finalizing

14 years agowidget: Unref accessible
Benjamin Otte [Sun, 18 Dec 2011 16:18:49 +0000 (17:18 +0100)]
widget: Unref accessible

14 years agoa11y: Fix crash in notebook
Benjamin Otte [Sun, 18 Dec 2011 16:14:47 +0000 (17:14 +0100)]
a11y: Fix crash in notebook

When the accessible was disposed before the notebook it referenced, the
weak ref could still trigger. This works around it.

14 years agowidget: Unset self from accessible
Benjamin Otte [Sun, 18 Dec 2011 16:05:20 +0000 (17:05 +0100)]
widget: Unset self from accessible

14 years agowidget: Unset widget on accessibles
Benjamin Otte [Sun, 18 Dec 2011 15:55:14 +0000 (16:55 +0100)]
widget: Unset widget on accessibles

14 years agoaccesible: Manage the DEFUNCT state
Benjamin Otte [Sun, 18 Dec 2011 15:41:06 +0000 (16:41 +0100)]
accesible: Manage the DEFUNCT state

A GtkAccessible with a NULL widget is defunct, there's no way around it.